<?php
/**
 * Author: Administrator
 * Date: 2022/7/28 1:02
 */

namespace DesignPatterns\Behavioral\Observer;

class UserGrowUp implements \SplObserver
{
    const EVENT = 'age';

    /**
     *
     */
    public function update(\SplSubject $subject): void
    {
        echo 'Congratulations to your '. $subject->getAge() .' birthday!'.PHP_EOL;
    }
}